Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Catch ASG error of failing to upload WAF policy #343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zhaoqin-github
Copy link
Collaborator

No description provided.

@zhaoqin-github zhaoqin-github added the bug Something isn't working label Sep 27, 2019
@zhaoqin-github zhaoqin-github self-assigned this Sep 27, 2019
@zhaoqin-github zhaoqin-github changed the title Catch ASG error of failing to upload WAF policy (WIP) Catch ASG error of failing to upload WAF policy Sep 27, 2019
@zhaoqin-github zhaoqin-github force-pushed the waf-upload branch 4 times, most recently from 6953d1c to ef079bc Compare September 29, 2019 06:01
@zhaoqin-github zhaoqin-github changed the title (WIP) Catch ASG error of failing to upload WAF policy Catch ASG error of failing to upload WAF policy Sep 29, 2019
Comment on lines +230 to +234
if (error.code === 404) {
throw new HttpErrors.NotFound(`ASG error: ${error.message}`);
} else {
throw new HttpErrors.UnprocessableEntity(`ASG error: ${error.message}`);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ASG error may be not accurate. How do we know if fails because of ASG not because of some reason else.
Furthermore, I think this change's benefit is adding ${error.message} in the error response. if (error.code === 404) is useless.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants